package com.foreverwin.jzymes.framework.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AppEventPublisher {

    @Autowired
    ApplicationContext applicationContext;

    @Async
    public void publishEvent( ApplicationEvent event ){
        applicationContext.publishEvent( event );
    }
}
